import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import index from "@/views/index.vue";

import cc from "@/views/cc.vue";
import login from "@/views/login.vue";
import profile from "@/views/user/profile.vue";
import reset from "@/views/user/reset.vue";

import workbench from "@/views/工作台/workbench.vue";
import qyView from "@/views/y/qyView.vue";
import xqView from "@/views/y/xqView.vue";
import jlView from "@/views/y/jlView.vue";
import bjView from "@/views/y/bjView.vue";
import education_statistics from "@/views/数据统计/education_statistics.vue";
import operation_log from "@/views/user/operation_log.vue";
import ManagementView from "@/views/xt/ManagementView.vue";
import settings_informationView from "@/views/xt/settings_informationView.vue";
import settings_drugView from "@/views/xt/settings_drugView.vue";
import slideshowView from "@/views/xt/slideshowView.vue";
import xieyiVue from "@/views/xt/xieyiView.vue";
import AddinformationView from "@/views/xt/AddinformationView.vue";
import xyView from "@/views/y/xyView.vue";
import noticeView from "@/views/xt/noticeView.vue";
import roleView from "@/views/xt/roleView.vue";
import JmXgView from "@/views/juminguanli/JmXgView.vue";
import FwView from "@/views/FwView.vue";
import addView from "@/views/addView.vue";

import xq from "@/views/xq.vue";
import dwellers from "@/views/dwellers.vue";
import detialView from "@/views/detialView.vue";
import SrView from "@/views/SrView.vue";
import UpdateView from "@/views/UpdateView.vue";

Vue.use(VueRouter)

const routes = [


  {
    path: '/login',
    name: 'login',
    component: login
  },

  {
    path: '/',
    name: 'index',
    component: index,
    children: [
      {
        path: '/addteam',
        name: 'Addteam',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/AddTeamView.vue')
      },
      {
        path: '/cc',
        name: 'cc',
        component: cc
      },
      {
        path: '/jmgl',
        name: 'jmgl',
        component: () => import(/* webpackChunkName: "about" */ '../views/juminguanli/JmglView.vue')
      },
      {
        path: '/addJm',
        name: 'addJm',
        component: () => import(/* webpackChunkName: "about" */ '../views/juminguanli/addJmView.vue')
      },
      {
        path: '/jmXq',
        name: 'jmXq',
        component: () => import(/* webpackChunkName: "about" */ '../views/juminguanli/JmXqView.vue')
      },
        {
          path: '/jmXg',
          name: 'jmXg',
          component: JmXgView
        },
      {
        path: '/message',
        name: 'message',
        component: () => import(/* webpackChunkName: "about" */ '../views/juminguanli/MessageView.vue')
      },

      {
        path: '/profile',
        name: 'profile',
        component: profile
      },
      {
        path: '/reset',
        name: 'reset',
        component: reset
      },
      // {
      //   path: '/dd',
      //   name: 'dd',
      //   component: dd
      // },
      {
        path: '/xmgl',
        name: 'xmgl',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/XmglView.vue')
      },
      {
        path: '/fwb',
        name: 'fwb',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/Fwb.vue')
      },
      {
        path: '/add',
        name: 'add',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/AddView.vue')
      },
      {
        path: '/baoxq',
        name: 'baoXq',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/XqView.vue')
      },
      {
        path: '/workbench',
        name:'workbench',
        component: workbench
      },

      {
        path: '/qy',
        name: 'qy',
        component: qyView
      },
      {
        path: '/yxq',
        name: 'yxq',
        component: xqView
      },
      {
        path: '/jl',
        name: 'jl',
        component: jlView
      },
      {
        path: '/bj',
        name: 'bj',
        component: bjView
      },
      {
        path: '/doctor',
        name: 'doctor',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/DoctorView.vue')
      },
      {
        path: '/doctorxq',
        name: 'doctorxq',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/DoctorXqView.vue')
      },
      {
        path: '/doctor2',
        name: 'doctor2',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/Doctor2.vue')
      },
      {
        path: '/saveorupdatedoctor',
        name: 'saveorupdatedoctor',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/SaveOrUpdateDoctor.vue')
      },
      {
        path: '/education_statistics',
        name: 'education_statistics',
        component: education_statistics
      },
      {
        path: '/operation_log',
        name: 'operation_log',
        component: operation_log
      },
      {
        path: '/management',
        name:'management',
        component: ManagementView
      },
      {
        path: "/settings_drug",
        name: "settings_drug",
        component: settings_drugView
      },
      {
        path: '/settings_information',
        name: 'settings_information',
        component: settings_informationView
      },
      {
        path: '/add-article',
        name: 'add-article',
        component: AddinformationView // 新增的路由
      },
      {
        path: '/settings_drug',
        name: 'settings_drug',
        component: settings_drugView
      },


      {
        path: '/slideshow',
        name: 'slideshow',
        component: slideshowView
      },
      {
        path: '/xieyi',
        name: 'xieyi',
        component: xieyiVue
      },
      {
        path: '/xy',
        name: 'xy',
        component: xyView
      },
      {
        path: '/notice',
        name: 'notice',
        component: noticeView
      },
      {
        path: '/role',
        name: 'role',
        component: roleView
      },
      {
        path: '/team',
        name: 'team',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/TeamView.vue')
      },
      {
        path: '/jg',
        name: 'jg',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/JgView.vue')
      },
      {
        path: '/addjg',
        name: 'addjg',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/AddJgView.vue')
      },
      {
        path: '/addteam',
        name: 'addteam',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/AddTeamView.vue')
      },
      {
        path: '/xqteam',
        name: 'xqteam',
        component: () => import(/* webpackChunkName: "about" */ '../views/资料管理/XqTeamView.vue')
      },
      {
        path: '/fw',
        name: 'fw',
        component: FwView
      },
      {
        path: '/addView',
        name: 'add',
        component: addView
      },
      {
        path: '/detial',
        name: 'detial',
        component: detialView
      },
      {
        path: '/xq',
        name: 'xq',
        component: xq
      },
      {
        path: '/dwellers',
        name: 'dwellers',
        component: dwellers
      },
      {
        path: '/FwView',
        name: 'FwView',
        component: FwView
      },
      {
        path: '/sr',
        name: 'sr',
        component: SrView
      },
      {
        path: '/addView',
        name: 'addView',
        component: addView
      },
      {
        path: '/update',
        name: 'update',
        component: UpdateView
      },


      // {
      //   path: '/dd',
      //   name: 'dd',
      //   component: dd
      // },
    ]
  },
  // {
  //   path: '/',
  //   name: 'home',
  //   component: HomeView
  // },
  {
    path: '/about',
    name: 'about',
    // route level code-splitting
    // this generates a separate chunk (about.[hash].js) for this route
    // which is lazy-loaded when the route is visited.
    component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
  }
]

const router = new VueRouter({
  routes
})

export default router
